<?php 

/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Gmap
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */

return array(
  // Package -------------------------------------------------------------------
  'package' => array(
    'type' => 'module',
    'name' => 'gmap',
    'version' => '4.1.2',
    'path' => 'application/modules/Gmap',
    'repository' => 'radcodes.com',

    'title' => 'Google Map',
    'description' => 'This plugin allows your social network users to post and share locations which can be search, browse, and display on maps.',
    'author' => 'Radcodes Developments',    
    
    'actions' => array(
       'install',
       'upgrade',
       'refresh',
       'enable',
       'disable',
     ),
    'callback' => array(
      'path' => 'application/modules/Gmap/settings/install.php',
      'class' => 'Gmap_Installer',
    ),
    'dependencies' => array(
      'radcodes' => array(
        'type' => 'module',
        'name' => 'radcodes',
        'minVersion' => '4.0.3'
      )
    ),
    'directories' => array(
      'application/modules/Gmap',
    ),
    'files' => array(
      'application/languages/en/gmap.csv',
    ),
  ),
  // Hooks ---------------------------------------------------------------------
  'hooks' => array(
    array(
      'event' => 'onStatistics',
      'resource' => 'Gmap_Plugin_Core'
    ),
    array(
      'event' => 'onUserDeleteBefore',
      'resource' => 'Gmap_Plugin_Core',
    ),
  ),
  // Items ---------------------------------------------------------------------
  'items' => array(
    'gmap',
    'gmap_album',
    'gmap_photo',
    'gmap_category',
  ),
  // Routes --------------------------------------------------------------------
  'routes' => array(
    'gmap_extended' => array(
      'route' => 'gmaps/:controller/:action/*',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'index',
      ),
      'reqs' => array(
        'controller' => '\D+',
        'action' => '\D+',
      )
    ),
    'gmap_specific' => array(
      'route' => 'gmaps/:action/:gmap_id/*',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'index',
      ),
      'reqs' => array(
        'action' => '(edit|delete|publish|success)',
        'gmap_id' => '\d+',
      )
    ),    
    'gmap_general' => array(
      'route' => 'gmaps/:action/*',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'browse',
      ),
      'reqs' => array(
        'action' => '(browse|create|manage|members)',
      )
    ),

    'gmap_profile' => array(
      'route' => 'gmap/:gmap_id/:slug',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'view',
        'slug' => '',
      ),
      'reqs' => array(
        'gmap_id' => '\d+',
      )
    ),
    'gmap_preview' => array(
      'route' => 'gmap/preview/:gmap_id/*',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'preview',
      ),
      'reqs' => array(
        'gmap_id' => '\d+',
      )
    ),
    'gmap_home' => array(
      'route' => 'gmaps',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'index'
      )
    ),    
    'gmap_browse' => array(
      'route' => 'gmaps/browse/*',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'browse'
      )
    ),
    'gmap_manage' => array(
      'route' => 'gmaps/manage/*',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'manage',
      )
    ), 
    'gmap_tags' => array(
      'route' => 'gmaps/tags/*',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'tags',
      )
    ),     
    'gmap_list' => array(
      'route' => 'gmaps/list/:user_id/*',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'list',
      )
    ),
    'gmap_create' => array(
      'route' => 'gmaps/create',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'create'
      )
    ),    
    'gmap_edit' => array(
      'route' => 'gmaps/edit/:gmap_id',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'edit'
      )
    ), 
    'gmap_delete' => array(
      'route' => 'gmaps/delete/:gmap_id',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'delete'
      )
    ),      
    'gmap_edit_coordinate' => array(
      'route' => 'gmaps/edit/coordinate/:gmap_id',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'edit-coordinate'
      )
    ),  
    'gmap_success' => array(
      'route' => 'gmaps/success/:gmap_id',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'index',
        'action' => 'success'
      )
    ),           
    'gmap_admin_manage_level' => array(
      'route' => 'admin/gmap/level/:level_id',
      'defaults' => array(
        'module' => 'gmap',
        'controller' => 'admin-level',
        'action' => 'index',
        'level_id' => 1
      )
    ),  
  ),
);
